<template>
	<view class="content">
		<navBar></navBar>

		<view class="banner">
			<image :src="baseUrl + banner.ads[0].appPath" mode="widthFix"></image>
		</view>

		<view class="screen-box p0_30">
			<view class="title-box">
				<view class="text">
					<!-- <text>UMIND</text> 万蔓 -->
					{{firstpar.ads[0].title}}
				</view>
				<view class="line"></view>
			</view>

			<view class="intr">
				<rich-text :nodes="firstpar.ads[0].content"></rich-text>
			</view>

			<image :src="baseUrl+firstpar.ads[0].appPath" class="image" mode="widthFix"></image>


			<view class="intr">
				<rich-text :nodes="firstpar.ads[1].content"></rich-text>
			</view>


		</view>

		<view class="screen-box p0_30">
			<view class="title-box">
				<view class="text">
					{{secondpar.ads[0].title}}
				</view>
				<view class="line"></view>
			</view>

			<view class="intr">
				<rich-text :nodes="secondpar.ads[0].content"></rich-text>
			</view>


			<view class="image">
				<image :src="baseUrl+secondpar.ads[0].appPath" mode="widthFix"></image>
			</view>

		</view>

		<view class="screen-box">
			<view class="title-box">
				<view class="text">
					{{thirdpar.ads[0].title}}
				</view>
				<view class="line"></view>
			</view>

			<view class="intr">
				<rich-text :nodes="thirdpar.ads[0].content"></rich-text>
			</view>


			<view class="image">
				<image :src="baseUrl+thirdpar.ads[0].appPath" mode="widthFix"></image>
			</view>

		</view>


		<!-- <bottom></bottom> -->
	</view>
</template>

<script>
	import navBar from '@/components/navbar/navbar.vue';
	import bottom from '@/components/bottom-follow/bottom-follow.vue';
	import {
		productIndex
	} from '@/api/home.js'
	export default {
		components: {
			navBar,
			bottom,
		},
		data() {
			return {
				baseUrl: this.$baseUrl,
				banner: {},
				firstpar: {},
				secondpar:{},
				thirdpar:{}
			}
		},
		onLoad() {

		},
		
		
		onShareAppMessage(e) {
			console.log(e, 1111111)
			let mpShare={
				title:'久福到家',
				path:'/pages/index/index?scene='
			}
			if(uni.getStorageSync('userInfo')){
				let userInfo=uni.getStorageSync('userInfo')
				mpShare.path='/pages/index/index?scene='+userInfo.userId
			}
			return mpShare
		},
		onShow() {
			this.umind();
		},
		methods: {
			umind() {
				productIndex({
					webClient: 'app'
				}).then(res => {
					this.banner = res.data.umind[0],
					this.firstpar = res.data.umind[1],
					this.secondpar = res.data.umind[2],
					this.thirdpar = res.data.umind[3]

				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.screen-box {
		padding-top: 120rpx;
		text-align: center;

		.title-box {
			margin-bottom: 80rpx;

			.text {
				font-size: 48rpx;
				letter-spacing: 10rpx;
				color: #1a1a1a;
				margin-bottom: 50rpx;

				text {
					font-size: 48rpx;
					letter-spacing: 12rpx;
					color: #1a1a1a;
					font-weight: bold;
				}
			}

			.line {
				width: 160rpx;
				height: 3px;
				background-color: #e6e6e6;
				position: relative;
				margin: auto;
			}

			.line::after {
				position: absolute;
				content: '';
				left: 0;
				top: 0;
				height: 100%;
				width: 25rpx;
				background-color: #c10016;
			}
		}

		.intr {
			margin-top: 80rpx;

			rich-text {
				font-size: 28rpx !important;
				font-weight: 100 !important;
				line-height: 2;
				letter-spacing: 2rpx;
				color: #595757;

			}
		}

		.image {
			margin-top: 80rpx;
		}

	}
</style>
